import Cookies from "js-cookie";
//添加
export function setCookie(key, value) {
  Cookies.set(key, value);
}
//获取
export function getCookie(key) {
  return Cookies.get(key);
}
//清除
export function removeCookies(key) {
  Cookies.remove(key);
}
//清空
export function removeAllCookies(key) {
  const allCookies = Cookies.get();
  for (const cookieName in allCookies) {
    if (allCookies.hasOwnProperty(cookieName)) {
      Cookies.remove(cookieName);
    }
  }
}
